//
//  AppDelegate+UI.m
//  JYShop
//
//  Created by 花花 on 2017/9/28.
//  Copyright © 2017年 花花. All rights reserved.
//

#import "AppDelegate+UI.h"
#import "BaseTabBarViewController.h"
#import "BaseNavViewController.h"
#import "JYLoginController.h"
@implementation AppDelegate (UI)



- (void)initRootViewController{

    
    NSString *account = [[NSUserDefaults standardUserDefaults] objectForKey:kAccount];
    
    if (account == nil) {
       
        BaseNavViewController *nav =  [[BaseNavViewController alloc]initWithRootViewController:[[JYLoginController alloc]init]];
        self.window.rootViewController = nav;
    }else{
    
     [self setTabBar];
    }
    
}

- (void)setTabBar{
    
    NSLog(@"%@",LH.userId);
    self.window.rootViewController = [[BaseTabBarViewController alloc]init];


}

@end
